package edu.umn.cs5115.scheduler;

import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Shell;

import edu.umn.cs5115.scheduler.entities.CourseFactory;
import edu.umn.cs5115.scheduler.framework.Document;
import edu.umn.cs5115.scheduler.framework.DocumentController;
import edu.umn.cs5115.scheduler.framework.WindowController;

public class LeftPanelTest {
	public static void main(String[] args) {
		DocumentController.getSharedDocumentController().setDocumentFactory(new DocumentController.DocumentFactory()
        {
            public Document createDocument()
            {
                return new LeftPanelDocument();
            }
        });
        DocumentController.getSharedDocumentController().run();
	}
	
	private static class LeftPanelDocument extends SchedulerDocument
    {
        protected void createWindowControllers()
        {
            Shell shell = new Shell(DocumentController.getSharedDocumentController().getDisplay());
            shell.setLayout(new FillLayout());
            
            LeftPanel panel = new LeftPanel(shell, this);
            
            WindowController controller = new WindowController(this, shell);
            controller.showWindow();
        }
    }
}
